#ifndef _RUNTIME_
#define _RUNTIME_
#include <stdlib.h>
#include "Recovery.h"
/*Store size bytes of *value's contents into the address NVAddr in NV Mem*/
void STORE_NV(void *value, unsigned long NVAddr, size_t size);

/*Read size bytes from NV Mem addr NVAddr and put it in *buf*/
void LOAD_NV(void *buf, unsigned long NVAddr, size_t size);

void LD_CURR_CP_AFTER_RECOVERY_RTN( void *recoveryRtn );

void GET_RECOVERY_ROUTINE( void *recoveryRtn );

unsigned long GET_DEATH_ID();

void SET_DEATH_ID(unsigned long);

int GET_FAILURE_BIT();

void SET_FAILURE_BIT();

void CLEAR_FAILURE_BIT();

void TRY_BEGIN( unsigned ckptNo );

void TRY_END( unsigned ckptNo );

void STORE_EXPLICIT_CHECKPOINT( unsigned ckptNo );
extern "C" void __cdecl STORE_EXPLICIT_CHECKPOINT_WITH_RECOVERY( unsigned ckptNo, Recovery * );

extern "C" void __cdecl LOAD_EXPLICIT_CHECKPOINT( unsigned ckptNo );

void LOAD_CURRENT_CHECKPOINT();
#endif
